package cn.com.bluemoon.order.print.handler;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class CacheHandler {

	private static Map<String, byte[]> cache = new ConcurrentHashMap<String, byte[]>();

	public static void put(String key, byte[] value) {
		if (cache.containsKey(key)) {
			cache.remove(key);
		}
		System.out.println(key);
		System.out.println(value.length);
		cache.put(key, value);
	}

	public static  byte[] get(String key) {
		return cache.get(key);
	}
}
